<template>
    <li>
        <p>{{el.name}}说：
            <button @click="onDel">删除</button>
        </p>
        <p>{{ el.info }}</p>
    </li>
</template>

<script setup>
import {defineEmits} from 'vue'
const prop = defineProps(['el','index']);
// console.log(prop.el);

const emit = defineEmits();

const onDel = ()=>{
    // console.log(prop.index);
    emit('onDel',prop.index);
}
</script>

<style lang="scss" scoped></style>